<template>
  <view>
    <!-- <uni-calendar
      :insert="true"
      :lunar="true"
      mode="range"
      :start-date="'2019-3-2'"
      :end-date="'2019-5-20'"
      @change="change($event)"
    /> -->
   
    <view class="footer" >
      <u-button @click="handleComfire1" class="btn1" type="primary" :ripple="true" ripple-bg-color="#32afff">取消选择</u-button>
      <u-button @click="handleComfire" class="btn" type="primary" :ripple="true" ripple-bg-color="#32afff">确定</u-button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      show:true,
      fulldate: '',
       date: new Date().toISOString().slice(0, 10),

    }
  },
  methods: {
    change(e) {
      this.fulldate = e.fulldate
    },
    handleComfire() {
        if(!this.fulldate) this.fulldate=this.date
      if (this.fulldate) {
        uni.reLaunch({
          url: "/pages/preview/preview?date="+this.fulldate
        })
      }
    },
    // handleComfire1(){
    //     uni.reLaunch({
    //       url: "/pages/preview/preview"
    //     })
    // }
  }
}
</script>

<style  lang="scss" scoped>
.footer {
  margin: 0px 17px 0px;
  position: absolute;
  width: 90%;
  bottom: 17px;
}
.btn1 {
  margin-bottom: 3rpx
}
</style>
